import requests
from config import url, headers_web

url = url + "/courseApi/v1/terms/termResource"
from common.hashlib_utils import hash_md5

valid_code = hash_md5("&signKey=123123")


def get_terminfo(params):
    r = requests.get(url=url, params=params, headers=headers_web)
    return r


if __name__ == '__main__':
    params = {
        "": None,
        "validCode": valid_code
    }
    r = get_terminfo(params)
    print(r)
    print(r.json())
